package cn.saas.test22;

/**
 * @Title :
 * @date : 2021/10/8 15:27
 */
public class Computer {
    private String cpu;
    private String hd;
    private String memory;
    private String mouse;

    public Computer() {
    }

    public Computer(Builder builder) {
        this.cpu = builder.cpu;
        this.hd = builder.hd;
        this.memory = builder.memory;
        this.mouse = builder.mouse;
    }

    public String getCpu() {
        return cpu;
    }

    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public String getHd() {
        return hd;
    }

    public void setHd(String hd) {
        this.hd = hd;
    }

    public String getMemory() {
        return memory;
    }

    public void setMemory(String memory) {
        this.memory = memory;
    }

    public String getMouse() {
        return mouse;
    }

    public void setMouse(String mouse) {
        this.mouse = mouse;
    }

    public static class Builder {
        private String cpu;
        private String hd;
        private String memory;
        private String mouse;

        public Builder(Builder builder) {
            this.cpu = builder.cpu;
            this.hd = builder.hd;
            this.memory = builder.memory;
            this.mouse = builder.mouse;
        }

        public Builder() {
        }

        public Builder setCpu(String cpu) {
            this.cpu = cpu;
            return this;
        }

        public Builder setHd(String hd) {
            this.hd = hd;
            return this;
        }

        public Builder setMemory(String memory) {
            this.memory = memory;
            return this;
        }

        public Builder setMouse(String mouse) {
            this.mouse = mouse;
            return this;
        }
        public Builder create(){
            return new Builder(this);
        }
    }
}
